package com.easyidea.its.util.excel;

/*============================================================
 * $Id: $
 * $Revision: $
 * $Date: $ by $Author: $
 * ===========================================================
 * 
 * Copyright (c) 2006~2007 Infowarelab Co.,LTD. 
 * All rights reserved.
 * 
 * Please refer to the License for the detailed infomation
 *============================================================*/

/**
 * 
 * @author Harrison
 * @date 2007-6-6
 *
 */
public class MapSheetDefinition  {
	private boolean hasTitle = true;
	private String excelTitleKeyColumn = null;
	private String excelTitleValueColumn = null;
	private int excelIndexKeyColumn = -1;
	private int excelIndexValueColumn = -2;
	
	
	/**
	 * class constructor
	 * 
	 * @param hasTitle inform the excel destination has or has not contains the first line as the title
	 * @param keyIndex column index on excel which is contains the value on map key property
	 * @param valueIndex column index on excel which is contains the value on map value property
	 */
	public MapSheetDefinition(boolean hasTitle, int keyIndex, int valueIndex) {
		this.hasTitle = hasTitle;
		this.excelIndexKeyColumn = keyIndex;
		this.excelIndexValueColumn = valueIndex;
	}
	
	
	/**
	 * class constructor
	 * 
	 * @param keyTitle column title on excel which is contains the value on map key property
	 * @param valueTitle column title on excel which is contains the value on map value property
	 */
	public MapSheetDefinition(String keyTitle, String valueTitle) {
		this.hasTitle = true;
		this.excelTitleKeyColumn = keyTitle;
		this.excelTitleValueColumn = valueTitle;
	}
	
	
	/**
	 * @return the excelIndexKeyColumn
	 */
	public int getExcelIndexKeyColumn() {
		return excelIndexKeyColumn;
	}
	/**
	 * @param excelIndexKeyColumn the excelIndexKeyColumn to set
	 */
	public void setExcelIndexKeyColumn(int excelIndexKeyColumn) {
		this.excelIndexKeyColumn = excelIndexKeyColumn;
	}
	/**
	 * @return the excelIndexValueColumn
	 */
	public int getExcelIndexValueColumn() {
		return excelIndexValueColumn;
	}
	/**
	 * @param excelIndexValueColumn the excelIndexValueColumn to set
	 */
	public void setExcelIndexValueColumn(int excelIndexValueColumn) {
		this.excelIndexValueColumn = excelIndexValueColumn;
	}
	/**
	 * @return the excelTitleKeyColumn
	 */
	public String getExcelTitleKeyColumn() {
		return excelTitleKeyColumn;
	}
	/**
	 * @param excelTitleKeyColumn the excelTitleKeyColumn to set
	 */
	public void setExcelTitleKeyColumn(String excelTitleKeyColumn) {
		this.excelTitleKeyColumn = excelTitleKeyColumn;
	}
	/**
	 * @return the excelTitleValueColumn
	 */
	public String getExcelTitleValueColumn() {
		return excelTitleValueColumn;
	}
	/**
	 * @param excelTitleValueColumn the excelTitleValueColumn to set
	 */
	public void setExcelTitleValueColumn(String excelTitleValueColumn) {
		this.excelTitleValueColumn = excelTitleValueColumn;
	}


	/**
	 * @return the hasTitle
	 */
	public boolean isHasTitle() {
		return hasTitle;
	}


	/**
	 * @param hasTitle the hasTitle to set
	 */
	public void setHasTitle(boolean hasTitle) {
		this.hasTitle = hasTitle;
	}

}

